﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace PointMemery
{
    public partial class Form1 : Form
    {
        class Column
        {
            readonly int count;
            readonly float connectPerm = 0.5f;
            Dictionary<Point, float> connects = new Dictionary<Point, float>();
            Random r = new Random();
            public Column(Size sizeInput)
            {
                count = sizeInput.Width * sizeInput.Height / 10;
                //产生10%的随机连接
                while (connects.Count < count)
                {
                    Point p = new Point(r.Next(sizeInput.Width), r.Next(sizeInput.Height));
                    if (connects.ContainsKey(p)) continue;
                    connects.Add(p, (float)(r.Next(10) / 10));
                }
            }
        }
        //const Size sizeInput = new Size(12, 12);
        //const Size sizeColumn = new Size(16, 16);
        //byte[,] inputs = new byte[sizeInput.Width, sizeInput.Height];
        //Column[,] columns = new Column[sizeColumn.Width, sizeColumn.Height];

        public Form1()
        {
            ////初始化功能柱
            //for (int y = 0; y < sizeColumn.Height; y++)
            //{
            //    for (int x = 0; x < sizeColumn.Width; x++)
            //    {
            //        columns[x, y] = new Column(sizeInput);
            //    }
            //}

            InitializeComponent();
        }

        protected override void OnLoad(EventArgs e)
        {

        }

        protected override void OnPaint(PaintEventArgs e)
        {

        }

        private void timer1_Tick(object sender, EventArgs e)
        {

        }
    }
}
